﻿<BSButtonGroup>
    <BSButton Color="Color.Secondary">1</BSButton>
    <BSButton Color="Color.Secondary">2</BSButton>

    <BSDropdown IsGroup="true" IsOpen="@IsOpen">
        <BSDropdownToggle Color="Color.Secondary" onclick="onclick" IsOpen="@IsOpen">Dropdown</BSDropdownToggle>
        <BSDropdownMenu IsOpen="@IsOpen">
            <BSDropdownItem href="#">Dropdown link</BSDropdownItem>
            <BSDropdownItem href="#">Dropdown link</BSDropdownItem>
        </BSDropdownMenu>
    </BSDropdown>
</BSButtonGroup>

@code {
    bool IsOpen { get; set; }
    void onclick(MouseEventArgs e)
    {
        IsOpen = !IsOpen;
        StateHasChanged();
    }
}